$(function(){
    
	$("#btn").click(function(){
		/*var data=$("#da1").attr("name");
		var data2=$("#da2").attr("name");
		var data3=$("#da3").attr("name");
		
		if($("#da1").val()==""){
			
			alert("字段不能空："+ data);
		
			
		}else if($("#da2").val()==""){
			alert("字段不能空："+ data2);
			
			
		}else if($("#da3").val()==""){
			alert("字段不能空："+ data3);
			}*/
	  
        
        
		if("贰零壹伍"!=$("#da1").val()){
			if($("#da1").val()==""){
				
		     swal({
                    title: "出票日期(大写)：年",
                    text: "不能为空"
                });
				return false;
			}
			
			swal({
                    title: "出票日期(大写)：年",
                    text: "填写错误"
                });
			
			
		}else if("壹拾贰"!=$("#da2").val()){
			
			if($("#da2").val()==""){
				
		     swal({
                    title: "出票日期(大写)：月",
                    text: "不能为空"
                });
				return false;
			}
			
			swal({
                    title: "出票日期(大写)：月",
                    text: "填写错误"
               });
			
		}
		else if("壹拾壹"!=$("#da3").val()){
			
			if($("#da3").val()==""){
				
		     swal({
                    title: "出票日期(大写)：日",
                    text: "不能为空"
                });
				return false;
			}
			
			swal({
                    title: "出票日期(大写)：日",
                    text: "填写错误"
               });
			
			
			
		}else if("江苏百胜电子商务有限公司"!=$("#da4").val()){
			
			if($("#da4").val()==""){
				
		     swal({
                    title: "收款人",
                    text: "不能为空"
                });
				return false;
			}
			
			swal({
                    title: "收款人",
                    text: "填写错误"
               });
			
		
			
		}else if("壹仟元整"!=$("#da5").val()){
			
			if($("#da5").val()==""){
				
		     swal({
                    title: "人民币(大写)",
                    text: "不能为空"
                });
				return false;
			}
			
			swal({
                    title: "人民币(大写)",
                    text: "填写错误"
              });
              
			
		}else if("100000"!=$("#da6").val()){
			
			if($("#da6").val()==""){
				
		     swal({
                    title: "人民币(小写)",
                    text: "不能为空"
                });
				return false;
			};
			
			swal({
                    title: "人民币(小写))",
                    text: "填写错误"
              });
              
			
			
		}else if("备用金"!=$("#da7").val()){
			
			if($("#da7").val()==""){
				
		     swal({
                    title: "用途",
                    text: "不能为空"
                });
				return false;
			};
			
			swal({
                    title: "用途",
                    text: "填写错误"
              });
			
			
		}
		else if("154256315854"!=$("#da8").val()){
			
			if($("#da8").val()==""){
				
		     swal({
                    title: "密码",
                    text: "不能为空"
                });
				return false;
			};
			
			swal({
                    title: "密码",
                    text: "填写错误"
              });
			
			
		}else if("44030800"!=$("#da10").val()){
			
			if($("#da10").val()==""){
				
		     swal({
                    title: "行号",
                    text: "不能为空"
                });
				return false;
			};
			
			swal({
                    title: "行号",
                    text: "填写错误"
              });
              		
			
		}else if("2015"!=$("#da9").val()){
			
			if($("#da9").val()==""){
				
		     swal({
                    title: "年(左)",
                    text: "不能为空"
                });
				return false;
			};
			
			swal({
                    title: "年(左)",
                    text: "填写错误"
              });
			
			
		}else if("12"!=$("#da11").val()){
			
			if($("#da11").val()==""){
				
		     swal({
                    title: "月(左)",
                    text: "不能为空"
                });
				return false;
			};
			
			swal({
                    title: "月(左)",
                    text: "填写错误"
              });
			
			
		}else if("11"!=$("#da12").val()){
			
			if($("#da12").val()==""){
				
		     swal({
                    title: "日(左)",
                    text: "不能为空"
                });
				return false;
			};
			
			swal({
                    title: "日(左)",
                    text: "填写错误"
              });
			
			
		}else if("江苏百胜电子商务有限公司"!=$("#da13").val()){
			
			if($("#da13").val()==""){
				
		     swal({
                    title: "收款人(左)",
                    text: "不能为空"
                });
				return false;
			};
			
			swal({
                    title: "收款人(左)",
                    text: "填写错误"
             });
					
			
		}else if("1000"!=$("#da16").val()){
			
			if($("#da16").val()==""){
				
		     swal({
                    title: "金额(左)",
                    text: "不能为空"
                });
				return false;
			};
			
			swal({
                    title: "金额(左)",
                    text: "填写错误"
            });
			
		}else if("备用金"!=$("#da17").val()){
			
			if($("#da17").val()==""){
				
		     swal({
                    title: "用途(左)",
                    text: "不能为空"
                });
				return false;
			};
			
			swal({
                    title: "用途(左)",
                    text: "填写错误"
            });
			
			
		}else if($(".itp14 ul li").length<2){
			
			
				
		     swal({
                    title: "请添加出票人签章",
                    text: "请添加两个章"
                });
				
			
			
		}else if($("#da15a").attr("class")==""){
				
		     swal({
                    title: "请添加齐缝章",
                    text: "不能为空"
                });
					
			
		}else{
			  swal({
                    title: "太帅了",
                    text: "您全部答对了！",
                    type: "success"
                });
                
			/*alert("恭喜您，全部答对了");*/
			
		}
		
		var arrys=new Array();
		
		$(":text").each(function(i){
			arrys[i]=$(this).val();
		})
        
		
	});
	
	/*这里是弹层*/
	
   $("#da14").click(function(){
   	        if($(this).children().children().length>1){
   	        	$(this).children().children().first().remove();
   	        }
   	        
        	$(".zhangtan").fadeToggle();
           

    });
    
    $(".zhangtan").click(function(){
    	    $(".zhangtan").fadeToggle();

    	
    })
    
	$("#zang").click(function(){
		
		var path=$("#zang").attr("src");
		
		$(".itp14 ul").append('<li><img src="' + path + '"/></li>');
	})
    $("#zang2").click(function(){
		
		var path=$("#zang2").attr("src");
		
		$(".itp14 ul").append('<li><img src="' + path + '"/></li>');
		                    
		
	})
    $("#zang3").click(function(){
		var path=$("#zang3").attr("src");
		
		$(".itp14 ul").append('<li><img src="' + path + '"/></li>');
		                        		
	})
    
    /*二弹层*/
    $("#da15").click(function(){
    	
    	$(".zhangtana").fadeToggle();

    })
        $(".zhangtana").click(function(){
    	    $(".zhangtana").fadeToggle();

    	
    })
    var da15a=$("#da15a");
    
    $("#zanga").click(function(){
		
		var path= $(this).attr("src");
		
		da15a.attr("src",path);
        da15a.addClass("dawc");
		
	})
    
    /*申领支票反面*/
    $("#da18").click(function(){
    	
    	$(".frz").fadeToggle();

    })
    $(".frz").click(function(){
    	    $(".frz").fadeToggle();

    	
    })
    var da18a=$("#da18a");
    
    $("#zangavve").click(function(){
		
		var path= $(this).attr("src");
		da18a.attr("src",path);
		
	})
    
    
    

  
    //收据
    $(".shouju4").attr("style","background:url(images/shouju0.jpg) no-repeat top center;background-size:contain;");     
    
    $(".shouju3 li").click(function(){
    	
    	$(this).addClass("diyilian").siblings().removeClass("diyilian");
    	var index=$(this).index();
  
    	
    	
    	if($(".shouju4").eq(index)){
    		$(".shouju4").attr("style","background:url(images/shouju"+ index +".jpg) no-repeat top center;background-size:contain;");     
    	}
    	
    	
    })
        /*收据弹层*/
    $(".jkxjsq").click(function(){
    	
    	$(".soujutan").fadeToggle();

    })
        $(".soujutana").click(function(){
    	    $(".soujutan").fadeToggle();

    	
    })
    var da15wa=$("#da15wa");
    
    $("#zanga1").click(function(){
		
		var path= $(this).attr("src");
		
		da15wa.attr("src",path);
     
		
	})

    
    
})
